@import '../../style/mixins';
@import '../../style/themes/default';

@ActionSheetPrefixCls: am-action-sheet;

@import './base';

.@{ActionSheetPrefixCls} {
  bottom: 0;
  left: 0;
  position: fixed;
  width: 100%;

  &&-share {
    background-color: #f2f2f2;
  }

  &-title,
  &-message {
    margin: @h-spacing-lg auto;
    padding: 0 @h-spacing-lg;
    text-align: center;
  }

  &-title {
    font-size: @font-size-heading;
  }

  &-message {
    color: @color-text-caption;
    font-size: @font-size-base;
  }

  &-button-list {
    color: @color-text-base;
    text-align: center;

    &-item {
      box-sizing: border-box;
      font-size: @actionsheet-item-font-size;
      height: @actionsheet-item-height;
      line-height: @actionsheet-item-height;
      margin: 0;
      overflow-x: hidden;
      padding: 0 8 * @hd;
      position: relative;
      text-overflow: ellipsis;
      white-space: nowrap;
      .hairline('top');

      &&-active {
        background-color: @fill-tap;
      }
    }

    &-badge {
      align-items: center;
      display: flex;
      justify-content: center;

      .am-badge {
        flex-shrink: 0;
        margin-left: 8 * @hd;
      }
    }

    &-item-content {
      display: inline-block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .@{ActionSheetPrefixCls}-cancel-button {
      padding-top: @v-spacing-sm;
      position: relative;

      &-mask {
        background-color: #e7e7ed;
        height: @v-spacing-sm;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
        .hairline('top');
        .hairline('bottom');
      }
    }

    .@{ActionSheetPrefixCls}-destructive-button {
      color: @brand-error;
    }
  }

  &-share {

    &-list {
      -webkit-overflow-scrolling: touch;
      display: flex;
      .hairline('top');

      overflow-y: scroll;
      padding: @v-spacing-xl 0 @v-spacing-xl @h-spacing-lg;
      position: relative;

      &-item {
        flex: none;
        margin: 0 12 * @hd 0 0;

        &-icon {
          align-items: center;
          background-color: @fill-base;
          border-radius: @radius-sm;
          display: flex;
          height: 60 * @hd;
          justify-content: center;
          margin-bottom: @v-spacing-md;
          width: 60 * @hd;
        }

        &-title {
          color: @color-text-caption;
          font-size: @font-size-icontext;
          text-align: center;
        }
      }
    }

    &-cancel-button {
      background-color: @fill-base;
      box-sizing: border-box;
      color: @color-text-base;
      font-size: @button-font-size;
      height: @actionsheet-item-height;
      line-height: @actionsheet-item-height;
      position: relative;
      .hairline('top');
      text-align: center;

      &&-active {
        background-color: @fill-tap;
      }
    }
  }

  &-content {
    background-color: @fill-base;
  }
}

